package middle

import (
	"context"
	"gitee.com/lailonghui/vehicle-supervision-framework/pkg/loggers"
	"github.com/pkg/errors"
	"go.uber.org/zap"
)

func DefaultRecover(ctx context.Context, err interface{}) error {

	loggers.Error("panic", ctx, zap.Any("err", err), zap.Stack("stack"))

	return errors.New("internal system error")
}
